package com.itany.shop.entity;

/**
 * @author MissChen
 * @date 2024年03月28日 15:36
 */
public class Order {
    private Integer id;
    private String no;
    private Double price;

    //数据库user_id字段，一个订单属于一个用户，关联一个User实例
    private User user;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", no='" + no + '\'' +
                ", price=" + price +
                ", user=" + user +
                '}';
    }
}
